<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>问卷调查</title>
  <style>
    #red{
      color: red;
    }
  </style>
</head>
<body>
<table border="1px" >
  <tr>
   <td id="red"> 问卷调查：您最喜欢的歌手是谁？</td>
  </tr>
 <tr>
   <td>
     <label>
       <input type="radio" name="selectMode" id="selectAll" />全选
     </label>
     <label>
       <input type="radio" name="selectMode" id="selectNotAll" />全不选
     </label>
     <label>
       <input type="radio" name="selectMode" id="selectRevorse" />反选
     </label>
   </td>
 </tr>
  <tr>
    <td>
      <label>
        <input type="checkbox" id="Checkbox3" />刘德华
      </label>
      <label>
        <input type="checkbox" id="Checkbox4" />张学友
      </label>
      <label>
        <input type="checkbox" id="Checkbox5" />孙燕姿
      </label>
      <label>
        <input type="checkbox" id="Checkbox6" />刘欢
      </label>
    </td>
  </tr>
</table>
<script src="adapter/jquery.js"></script>
<script>
$(function () {
  //全选
  $("#selectAll").on("click",function () {
    $('#Checkbox3,#Checkbox4,#Checkbox5,#Checkbox6').prop("checked",true);
  });
  //全不部选
  $("#selectNotAll").on("click",function () {
    $('#Checkbox3,#Checkbox4,#Checkbox5,#Checkbox6').prop("checked",false);
  });
  //反选
  $("#selectRevorse").on("click",function () {
    $("input[type=checkbox]").each(function (i,n) {
      n.checked=!n.checked;
    })
  })
});
</script>
</body>
</html>
